//package com.example.behaviour.handler;
//
//
//import com.example.behaviour.message.GroupChatRequestMessage;
//import com.example.behaviour.message.GroupChatResponseMessage;
//import com.example.behaviour.session.GroupSessionFactory;
//import io.netty.channel.Channel;
//import io.netty.channel.ChannelHandler;
//import io.netty.channel.ChannelHandlerContext;
//import io.netty.channel.SimpleChannelInboundHandler;
//
//import java.util.List;
//
//@ChannelHandler.Sharable
//public class GroupChatRequestMessageHandler extends SimpleChannelInboundHandler<GroupChatRequestMessage> {
//    @Override
//    protected void channelRead0(ChannelHandlerContext ctx, GroupChatRequestMessage msg) throws Exception {
//        List<Channel> channels = GroupSessionFactory.getGroupSession()
//                .getMembersChannel(msg.getGroupName());
//
//        for (Channel channel : channels) {
//            channel.writeAndFlush(new GroupChatResponseMessage(msg.getFrom(), msg.getContent()));
//        }
//    }
//}
